package com.my.control
{
	import mx.core.UIComponent;
	
	public class MessageControl extends AbstractControl implements IControl
	{
		private static var instance : MessageControl = null;

		public static function startup(value : UIComponent):void{
			instance = new MessageControl(value);
		}
		
		public function MessageControl(value:UIComponent)
		{
			super(value);
		}
		
		public static function getInstance():MessageControl{
			return instance;
		}
		
		public function rightSwitchToState(index : int) :void{
			getView().rightView.selectedIndex = index;
		} 
		
		public function leftSwitchToState(index : int):void{
			getView().leftViiew.selectedIndex = index;
		}
		
		public function getView():messageFlex{
			return messageFlex(view);
		}
	}
}